﻿using ETA.Dtos;
using ETA.Entity;
using ETA.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace ETA.Web.Controllers
{
    public class ProjectTypeController : BaseController
    {
        private static IWorkTypeService _IWorkTypeService { set; get; }

        public ProjectTypeController(IWorkTypeService IWorkTypeService)
        {
            _IWorkTypeService = IWorkTypeService;
        }

        public ActionResult Index()
        {
            IEnumerable<WorkTypeDto> workTypeList = null;
            var response = _IWorkTypeService.QueryWorkTypeList(new QueryWorkTypeRequest());
            if (response.Result.IsSuccess)
            {
                workTypeList = response.WorkTypeList;
            }
            return View(workTypeList);
        }

    }
}
